<% if params[:action] != 'edit' and current_user %>
  <%= form.hidden_field :user_id, :value => @current_user.id %>
  <%= form.hidden_field :username, :value => @current_user.username %>
  <%= form.hidden_field :email, :value => @current_user.email %>
  <%= form.hidden_field :website, :value => @current_user.website %>
  感谢<%= @current_user.username %>发表留言！
<% else %>
  <p>
    <%= form.label :username,'姓名：' %><br />
    <%= form.text_field :username %><span class="require">*</span><%= error_message_on :comment, :username %>
  </p>
  <p>
    <%= form.label :email,'Email：' %><br />
    <%= form.text_field :email %><span class="require">* (<a href="javascript:void(0);" onClick="$('#website').slideToggle('slow');">Website</a>)</span><%= error_message_on :comment, :email %>
  </p>
<% end %>
<p id="website">
  <%= form.label :website,'站点：' %><br />
  <%= form.text_field :website %>(不要忘记http://)<%= error_message_on :comment, :website %>
</p>
<p>
  <%= form.label :content,'内容：' %><br />
  <%= form.cktext_area(:content, :toolbar => 'Basic', :language => 'zh-cn',:width => '90%', :height => '200px') %><span class="require">*</span><%= error_message_on :comment, :content %>
</p>
